package com.itkm.feignconsumer.service;

import com.itkm.pojo.Comment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Service
@FeignClient(name = "eureka-provider", fallbackFactory = CommentClientServiceCallBackFactory.class)
public interface CommentClientService {
    @GetMapping("/comment/all")
    List<Comment> getCommentList();

    @GetMapping("/comment/{id}")
    Comment getCommentById(@PathVariable("id") int id);
}
